<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link href="css/index2.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
</head>
<body>
<form action="xiang" method="post" enctype="multipart/form-data">
	<table>
		<tr>
			<td>商品名称</td><td><input type="text" id="name" readonly="readonly"> </td>
		</tr>
		<tr>
			<td>英文名称</td><td><input type="text" id="ename" readonly="readonly"> </td>
		</tr>
		<tr>
			<td>商品品牌</td><td><input type="text" id="pname" readonly="readonly"> </td>
		</tr>
		<tr>
			<td>商品种类</td><td><input type="text" id="tname" readonly="readonly"> </td>
		</tr>
		<tr>
			<td>尺寸</td><td><input type="text" id="size" readonly="readonly"> </td>
		</tr>
		<tr>
			<td>价格</td><td><input type="text" id="price" readonly="readonly"> </td>
		</tr>
		<tr>
			<td>数量</td><td><input type="text" id="number" readonly="readonly"> </td>
		</tr>
		<tr>
			<td>标签</td><td><input type="text" id="lic" readonly="readonly"> </td>
		</tr>
		<tr>
			<td>图片</td><td><img width="100px" > </td>
		</tr>
	</table>
</form>

<script type="text/javascript">
	var id=${param.id};
	alert(id)
	$.post(
		"selectxiang1",	
		{id:id},
		function(mas) {
			$("#name").val(mas.name);
			$("#ename").val(mas.ename);
			var ss=mas.brand;
			$("#pname").val(ss.pname);
			$("#tname").val(mas.tname);
			$("#size").val(mas.size);
			$("#price").val(mas.price);
			$("#number").val(mas.number);
			$("#lic").val(mas.label);
			$("img").attr("src","<%=request.getContextPath() %>/img/"+mas.tu+"");
		},
		"json"
	)

</script>
</body>
</html>